import http from "@/utils/request";
import { useLocation } from "@/stores/location";

export function fetchBrandList(cityId: string) {
  return http.get('/app-api/cake/brand/get_brand_lists', {
    'city_id': cityId
  });
}

// export function fetchBrandShopList(cityId: string, brandId: string) {
//   return http.get('/app-api/cake/brand/get_shop_lists', {
//     'city_id': cityId,
//     'brand_id': brandId,
//   });
// }

// 搜索商品
export function fetchBrandGoodList(brandId: string, pageNo: number, pageSize: number) {
  const { location } = useLocation()
  return http.get('/app-api/cake/product/list', {
    brandId,
    pageNo,
    pageSize,
    cityId: location.cityCode,
  });
}
